<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  <title><%=@page_title%></title>
  <%= stylesheet_link_tag "find", :media => "all" %>
  <%= javascript_include_tag :defaults %>
</head>
<body>
  <div id="header">
	<a href="/" title="Gistr home page"><img src="/images/logo.gif" border="0"></a>
	<div id="top">
      <div id="account">
        <%if logged_in? %>
      	  Welcome:
          <%= link_to(current_user.login, user_path(current_user), {:title => "{current_user.login}'s very own personal home page."}) %>
          <span id="signout">(<a href="/signout" title="Sign out of your Gistr account">Sign Out</a>)</span>
        <%else%>
		  <%= link_to 'Sign Up', signup_path, {:title => "Sign up for a new Gistr account."} %>
          <%= link_to 'Sign In', login_path, {:title => "Sign in to your Gistr account."} %>	
        <%end%>
      </div>    
    </div>
    <div id="topbar">
      <div class="main-link" style="margin-left:14px">
        <%= link_to 'Home', {:controller => 'default', :action => 'index'}, {:title => 'Home'} %>
        <%if logged_in? %>
		  <%= link_to 'My Gists', user_path(current_user), {:title => "View Your Gists"} %>
		  <%= link_to 'Contribute a Gist', new_gist_path, {:title => "Contribute a Gist."} %>	
	    <% end %>  
	    <%= link_to 'About', {:controller => 'default', :action => 'about_us'}, {:title => 'All about Gistr'}%>
	    <%= link_to 'Bookmarklet', {:controller => 'default', :action => 'bookmarklet'}, {:title => 'Gistr bookmarklet - makes it easy to add gists'}%>   
      </div> 
    </div>
  </div>
  <div id="content">
    <div id="messages">
      <% for name in [:notice, :warning, :message] %>
        <% if flash[name] %>
          <%= "<div class=\"message\" id=\"#{name}\">#{flash[name]}</div>" %>
        <% end %>
      <% end %>
    </div>
    <div id="main-content">
      <%= @content_for_layout %>
    </div>
  </div>
  <div id="footer">
	<a href="http://cosl.usu.edu" title="">Supported by The Center for Open and Sustainable Learning</a>    
  </div>
</body>
</html>